home *** CD-ROM | disk | FTP | other *** search
- Path: news.rwth-aachen.de!news
- From: ILT-Benutzer <user@ilt.fhg.de>
- Newsgroups: comp.lang.c++
- Subject: assembly lang. and Borland C++
- Date: 12 Jan 1996 14:08:47 GMT
- Organization: RWTH -Aachen / Rechnerbetrieb Informatik
- Message-ID: <4d5q1f$9ld@news.rwth-aachen.de>
- NNTP-Posting-Host: 192.102.148.64
-
- I think, I have an easy question:
-
- I wrote a projectfile with a C++module and an assembler-module in it.
- The C++module shall call a function written in assembly language.
- The solution for that problem I already have:
-
- C++ Modul:
- --------------------------------------
- ..
- extern "C" void far Assemblerprozedur(void);
- ..
- --------------------------------------
-
- Assembly language module:
- --------------------------------------
- ..
- PUBLIC _Assemblerprozedur;
- ..
- _Assemblerprozedur PROC FAR
-
- mov ax,0
- push bx
- ...
- ...
- ret
- _Assemblerprozedur ENDP
- --------------------------------------
-
- But I need the opposite of this. The assembly language module shall
- call a C++routine.
-
- I tried the following:
-
- C++ Modul:
- --------------------------------------
- ..
- void CProzedur()
- {
- ...
- }
- ..
- --------------------------------------
-
- and in assembymodul:
- --------------------------------------
- ..
- extrn _CProzedur:far
- ..
- ..
- call _CProzedur ; call the CRoutine
- --------------------------------------
-
- If I compile it as C (C-module has extension .C) code no error appears.
- But if I switch the key Options|compiler|C++options to
- CPP always the Linker says something like:
- Can┤t find _CProzedur ...
-
- So, I have to tell the assembler that it has to generate C++ Code.
- But how ???
-
- I would be very happy about a quick andwer !
-
- Nice to hear of you !
-
- Michael Bode
-
-
-
-
-
-
-
-